package fr.labri.macchiato.framework.business.finder;

/**
 * Callback interface for asynchronous calls
 * 
 * @author Matthieu FOUCAULT
 * 
 * @param <T>
 *            The result type
 */
public abstract class Callback<T> {

	/**
	 * Method called when the asynchronous method has finished
	 * 
	 * @param result
	 */
	public abstract void onCallback(T result);

	/**
	 * Method called if an exception has been thrown during the asynchronous
	 * call
	 * 
	 * @param caught
	 */
	public void onFailure(Throwable caught) {

	}

}
